<template>
    <li class="news-item">
        <span class="score">{{ item.score }}</span>
        <span class="title">
      <template>
        <a :href="item.url" target="_blank">{{ item.title }}</a>
      </template>
    </span>
        <br>
        <span class="meta">
      <span class="time">
        {{ item.time ? item.time : "未知时间" }}
      </span>
      <span class="comments-link">
          <router-link :to="'/new/'　+ index" style="margin-left: 10px">详细</router-link>
      </span>
    </span>
    </li>
</template>

<script>
    export default {
        name: 'news-item',
        props: ['item', 'index'],
    }
</script>

<style lang="stylus">
    .news-item
        background-color #fff
        padding 20px 30px 20px 80px
        border-bottom 1px solid #eee
        position relative
        line-height 20px
        .meta
            font-size .85em
            color #999
            a
                color #999
                text-decoration underline
                &:hover
                    color #ff6600
</style>
